﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for Promotion
/// </summary>
public class Promotion : BaseBAL
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
    public string Content { get; set; }
    public string Image { get; set; }
    public DateTime FromDate { get; set; }
    public DateTime ToDate { get; set; }
    public int Status { get; set; }
    public int IsActive { get; set; }
    public string ContentDetail { get; set; }
    public DateTime CreatedDate { get; set; }

    CPromotionFacade facade = new CPromotionFacade();
    public IList<Promotion> List(int pageIndex, int pageMax, int isActive)
    {
        return facade.List(pageIndex, pageMax, isActive);
    }
    public Promotion Detail(int Id)
    {
        return facade.Detail(Id);
    }
    public Promotion Insert(string name, string title, string description, string content, string image, DateTime fromDate, DateTime toDate, int status, int isActive, string contentDetail)
    {
        return facade.Insert(name, title, description, content, image, fromDate, toDate, status, isActive, contentDetail);
    }
    public Promotion Update(int id, string name, string title, string description, string content, string image, DateTime fromDate, DateTime toDate, int status, int isActive, string contentDetail)
    {
        return facade.Update(id, name, title, description, content, image, fromDate, toDate, status, isActive, contentDetail);
    }
    public Promotion UpdateStatusActive(int id, int isActive)
    {
        return facade.UpdateStatusActive(id, isActive);
    }
}
